﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TvGuide.UI.Models.SearchData>" %>

     
 <%using (Html.BeginForm("AdvanceSearch", "Search", new { lng=ViewData["lng"]})) %>     
   
   <%{%>  
    <div style="width:100%">
        <fieldset id="searchWidget">		
        <legend><b><%:TVGuide.Common.Main.DETAIL_SEARCH_LBL %></b></legend>
		<div class="advance-search-left">
				<div style="width:100%">
					<div class="adv-search-textbox"> <span class="searchTextbox">  <%: Html.TextBoxFor(m => m.SearchText)%> </span> </div>
				</div>

				<div>
				<span class="searchDates">
				<%--<%: Html.DisplayFor(m=>m.StartDateText) %>--%>
				<%:  Html.TextBoxFor(m => m.StartDateText, new { @readonly = "readonly" })%>
				
				<%--<%: Html.Label(Model.EndDateText_lbl)%>--%>
				<%:  Html.TextBoxFor(m => m.EndDateText, new { @readonly = "readonly" })%>
				</span>
				</div>
				
				<div class="cat-search-widget-wrapper">
				<% Html.RenderPartial("CategorySearchWidget"); %>
				</div>

				<p>
					<span class="searchButton"><input type="submit" value="<%=TVGuide.Common.Main.SEARCH_LBL %>" /></span>
				</p>
				</div> <!-- closing advance-search-left div-->
				<div id="quickSearchLinks">
                    <a href='/<%=ViewData["lng"]%>/Search/GetFilmForTheEvening'><%=TVGuide.Common.Main.WHAT_FILM_WATCH_INEVENING_LBL%></a> </br> 
                    <a href='/<%=ViewData["lng"]%>/Search/GetHumorForTheEvening'><%=TVGuide.Common.Main.MAYBE_HUMOR_PROGRAM_LBL%></a> </br>      
                    <a href='/<%=ViewData["lng"]%>/Search/GetSportForTheEvening'><%=TVGuide.Common.Main.IF_SPORT_LBL%></a></br>
                    <a href='/<%=ViewData["lng"]%>/Search/GetSoapForTheEvening'><%=TVGuide.Common.Main.HM_SERIAL_LBL%></a></br>
				</div>
        </fieldset>
    </div>
    <% }%>

   <% if(Model.partstr.Count>0)
   { 
   %>
        <div class = "search-text-by-parts">
            <%:TVGuide.Common.Main.YOU_ARE_SEARCHING_FOR %> 
       
            <% foreach(var ss in Model.partstr)
               {
            %>
               <span class = "Advance-Search-label-parts"  onclick="searchProgram('<%:ss %>')"><%: ss %></span>        
            <%
               }
            %>
            <%:TVGuide.Common.Main.FOR_WORDS_LBL%>
        </div>
    <% 
    } 
    %>